package com.atguigu.gmall.product.client;

import com.alibaba.nacos.common.util.ClassUtils;
import org.csource.fastdfs.ClientGlobal;
import org.csource.fastdfs.StorageClient1;
import org.csource.fastdfs.TrackerClient;
import org.csource.fastdfs.TrackerServer;

public class test1 {
    public static void main(String[] args) throws Exception{
        String path = ClassUtils.getDefaultClassLoader().
                getResource("fdfs_client.conf").getPath();
        ClientGlobal.init(path);
        TrackerClient trackerClient = new TrackerClient();
        TrackerServer trackerServer = trackerClient.getConnection();
        StorageClient1 storageClient1 = new StorageClient1(trackerServer,null);
        String fileId = storageClient1.upload_file1(
                "D:\\99\\996.jpg"
                ,".jpg",null);
        System.out.println(fileId);
    }
}
